package com.yklab.library.http.base;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

/**
 * 用于文件上传服务
 * Created by yml on 16/9/29.
 */
public class UploadCallBack implements Callback {
    @Override
    public void onFailure(Call call, IOException e) {

    }

    @Override
    public void onResponse(Call call, Response response) throws IOException {

    }

    /**
     * 上传文件过程中的回调
     * @param totalCount 需要上传的总次数
     * @param uploadedCount 已经完成上传的次数
     * @param isFailed 是否整个记录上传失败 true：显示上传百分比并提示记录上传失败  false：显示已经上传百分比
     */
    public void onUploadfail(int totalCount,int uploadedCount,boolean isFailed){

    }

    /**
     * 网络故障
     */
    public void onNetWorkFail(){

    }
}
